import java.util.Scanner;

public class test3 {
    public static Boolean isPrimeNumber(int number) {

        //write your code here......
        if(number<=2){
            return true;
        }else{
            for (int i = 0; i <number ; i++) {
                if(number% i ==0){
                    return false;
                }else{
                    return true;
                }
            }
        }
        return true;
    }
    public static void main(String[] args) {
        Main main = new Main();
        Scanner scan = new Scanner(System.in);
        int number = scan.nextInt();
        System.out.println(isPrimeNumber(number));
    }


}

